package com.bianhua.front;

import com.bianhua.entity.Dict;
import com.bianhua.service.DictService;
import com.bianhua.utils.Result;
import com.github.pagehelper.PageInfo;
import com.bianhua.entity.Dict;
import com.bianhua.service.DictService;
import com.bianhua.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;



@RestController
@RequestMapping("/f/dict/")
public class DictFront {

    @Autowired
    private DictService dictService;

    @PostMapping("query")
    public Map<String,Object> query(@RequestBody Dict dict){
        PageInfo<Dict> pageInfo = dictService.query(dict);
        return Result.ok(pageInfo);
    }

}
